package com.tq110.pojo;

import java.util.List;

public class PageBean  extends  TempBean{
    private int   curPage;
    private int   total;
    private int   pageSize =10;
    private int   totalPage;
    private List   datas;


    public void setCurPage(int curPage) {
        if (curPage<0){
            curPage=1;
        }
        this.curPage = curPage;
    }

    public void setPageSize(int pageSize) {
        if (pageSize==0){
            this.pageSize =10;
        } else {
            this.pageSize = pageSize;
        }
    }

    public void setTotal(int total) {
        this.total = total;
        this.totalPage=total/this.pageSize;
        if (total%this.pageSize!=0){
            this.totalPage++;
        }
    }

    public void setDatas(List datas) {
        this.datas = datas;
    }

    public List getDatas() {
        return datas;
    }

    public int getCurPage() {
        return curPage;
    }

    public int getPageSize() {
        return pageSize;
    }

    public int getTotalPage() {
        return totalPage;
    }

}
